package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.NovelTypeMapper;
import com.gtenacg.cartoonservice.pojo.model.NovelType;
import com.gtenacg.cartoonservice.service.NovelTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【gt_novel_type(小说类型表)】的数据库操作Service实现
* @createDate 2024-05-22 08:46:33
*/
@Service
@RequiredArgsConstructor
public class NovelTypeServiceImpl implements NovelTypeService{
    private final NovelTypeMapper typeMapper;

    @Override
    public List<NovelType> list() {
        return typeMapper.list();
    }

    @Override
    public List<NovelType> search(String name) {
        return typeMapper.search(name);
    }

    @Override
    public Integer insert(NovelType novelType) {
        typeMapper.insert(novelType);
        return novelType.getNtid();
    }

    @Override
    public void update(NovelType novelType) {
        typeMapper.update(novelType);
    }

    @Override
    public void delete(List<Integer> ids) {
        typeMapper.delete(ids);
    }
}




